import collections


class Solution(object):
    def canPermutePalindrome(self, s):
        """
        :type s: str
        :rtype: bool
        """
        d = collections.Counter(s)
        count_value = 0
        for key in d:
            if d[key] % 2 == 1:
                count_value += 1
        if count_value <= 1:
            return True
        else:
            return False


data = Solution()
s = "carerac"
print(data.canPermutePalindrome(s))
